package com.lcj.hub.db.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 成绩表 实体类。
 *
 * @author lcj
 * @since 2024-08-04
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "成绩表")
@Table("grades")
public class Grades implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 成绩ID，主键
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "成绩ID，主键")
    private Integer gradeId;

    /**
     * 学生ID，外键引用学生表
     */
    @Schema(description = "学生ID，外键引用学生表")
    private Integer studentId;

    /**
     * 课程ID，外键引用课程表
     */
    @Schema(description = "课程ID，外键引用课程表")
    private Integer courseId;

    /**
     * 成绩
     */
    @Schema(description = "成绩")
    private String grade;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Timestamp createdAt;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private Timestamp updatedAt;

}
